package com.yjha.lzmarathonsys.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yjha.lzmarathonsys.bean.TbComment;
import com.yjha.lzmarathonsys.utils.PageUtils;
import com.yjha.lzmarathonsys.utils.R;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * 评论表
 *
 * @author æ­å°
 * @email 1971240051@qq.com
 * @date 2025-05-13 15:07:07
 */
public interface TbCommentService extends IService<TbComment> {

    /**
     * 审核列表
     * @param params
     * @return
     */
    PageUtils queryPage(Map<String, Object> params);

    /**
     *  添加评论
     * @param comment
     * @return
     */
    R addComment(TbComment comment,HttpServletRequest request);

    /**
     *  审核
     * @param tbCommentId 评论ID
     * @param status　1 通过  2未通过
     * @return
     */
    R auditComment(Integer tbCommentId,Integer type, Integer status);

    /**
     *  获取对应文章评论
     * @param tbTargetId
     * @return
     */
    R getCommentTree(Integer tbTargetId , Integer type, HttpServletRequest request);

    R deleteComment(Integer commentId, Integer type, HttpServletRequest request);
}

